import { detailpvApi } from '@/api/filmApi'
export const showFooterHook = (to, from, next) => {
  if (to.name === 'detail') {
    // 它是一个详情信息，记录下来
    recordDetailPv(to)
  }

  next()
}

async function recordDetailPv(to) {
  // console.log(to)
  // 通过ajax网络请求，记录下来你每次访问
  let ret = await detailpvApi(1)
  console.log(ret)
}
